package com.sunu.entity.worker_job;

import com.sunu.entity.job.Job;
import com.sunu.entity.worker.Worker;

/**
 * Created by i on 2019/9/20.
 */
public class Worker_Job {
    private Integer workerId;
    private Integer jobId;
    private String workerName;
    private String jobName;
    private Integer salary;

    private Worker worker;
    private Job job;

    public Worker_Job(Integer workerId, Integer jobId, String workerName, String jobName, Integer salary) {
        this.workerId = workerId;
        this.jobId = jobId;
        this.workerName = workerName;
        this.jobName = jobName;
        this.salary = salary;
    }

    public Worker_Job(Worker worker, Job job) {
        this.workerId = worker.getWorkerId();
        this.jobId = job.getJobId();
        this.workerName = worker.getWorkerName();
        this.jobName = job.getJobName();
        this.salary = job.getSalary();
    }

    @Override
    public String toString() {
        return "Worker_Job{" +
                "workerId=" + workerId +
                ", jobId=" + jobId +
                ", workerName='" + workerName + '\'' +
                ", jobName='" + jobName + '\'' +
                ", salary=" + salary +
                '}';
    }

    public Integer getWorkerId() {
        return workerId;
    }

    public void setWorkerId(Integer workerId) {
        this.workerId = workerId;
    }

    public Integer getJobId() {
        return jobId;
    }

    public void setJobId(Integer jobId) {
        this.jobId = jobId;
    }

    public String getWorkerName() {
        return workerName;
    }

    public void setWorkerName(String workerName) {
        this.workerName = workerName;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public Integer getSalary() {
        return salary;
    }

    public void setSalary(Integer salary) {
        this.salary = salary;
    }

    public Worker getWorker() {
        return worker;
    }

    public void setWorker(Worker worker) {
        this.worker = worker;
    }

    public Job getJob() {
        return job;
    }

    public void setJob(Job job) {
        this.job = job;
    }
}
